{% extends "base.html" %}
{% block title %}{% endblock %}
{% block content %}
<br>
<div class="layui-body" style="overflow:auto;left:1px">
    <br>
    <ul class="layui-timeline" id="timeList">

    </ul>
</div>

<script>
    layui.use(['table','code'], function(){
          var table = layui.table
          ,form = layui.form;
          var $= layui.jquery;
          case_id = {{case_id}};
          resultId = {{resultId}};
            $.ajax({
                                            //发出请求
                                            type:"GET",
                                            url:"/basecase/case/result/historyFail?case_id="+case_id+"&resultId="+resultId,
                                            contentType: 'application/json; charset=utf-8',
                                            dataType:"json",
                                            data:{"case_id":1,"resultId":1},
                                            success: function(result){
                                                strHtml = "";
                                                result.data.forEach(function(value, index, array) {

                                                    timeStr = '<li class="layui-timeline-item">'+
                                                               ' <i class="layui-icon layui-timeline-axis">&#xe63f;</i>'+
                                                               '   <div class="layui-timeline-content layui-text">'+
                                                               '    <h3 class="layui-timeline-title">'+value.last_time+''+
                                                               '<br><br><span style="color:green">缺陷信息：</span><a href="'+value.bug_url +'"><span style="color:red">'+value.bug_url+
                                                               '</span></a>        &nbsp;&nbsp;<span style="color:green">'+value.bug_des+'</span></h3>'+
                                                               '    </div>'+
                                                               ' </li>';
                                                    strHtml = strHtml + timeStr;
                                                });
                                                newHtml = '<ul class="layui-timeline" id="timeList">'+strHtml+'</ul>';
                                                $('#timeList').html(newHtml);
                                            }
                });
        });


</script>
{% endblock %}